{% extends '::layout.html.twig' %}

{% block title %} 
  Player Index
{% endblock %}

{# % blocl body %}
Tous les joueurs

{{ form(form) }}

<table>
  <tr>
    <th>Nom</th>
    <th>Prenom</th>
    <th>Genre</th>
    <th>Adresse</th>
    <th>Adresse des parents</th>
    <th>Mobile</th>
    <th>Telephone</th>
    <th>License</th>
    <th>Divers</th>
  </tr>
  
{% for player in allPlayers %}
  <tr>
  <td>
  {{player.nom}}
  </td>
  <td>
    {{player.prenom}}
  </td>
  <td>
    {{player.genre}}
  </td>
  <td>
    {{player.adresse}}
  </td>
  <td>
    {{player.adresseParents}}
  </td>
  <td>
    {{player.mobile}}
  </td>
  <td>
    {{player.tel}}
  </td>
  <td>
    {{player.license}}
  </td>
  <td>
    {{player.divers}}
  </td>
  </tr>
  {% endfor %}
  
</table>
  
  {% endblock %#}
  {% block body %}
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Project Basket </a>
            </div>
            <div class="navbar-collapse collapse">
                <form class="navbar-form navbar-right" role="form">
                    <div class="form-group">
                        <input type="text" placeholder="Email" class="form-control">
                    </div>
                    <div class="form-group">
                        <input type="password" placeholder="Password" class="form-control">
                    </div>
                    <button type="submit" class="btn btn-success">Sign in</button>
                </form>
            </div><!--/.navbar-collapse -->
        </div>
    </div>
    <div>
        <br>
    </div>
    <div class="container">
        <!-- Example row of columns -->
        <div class="row centered-form">
            <div class="col-md-10 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><strong>Inscription</strong> <small> Formulaire pour l'inscription d'une personne !!! </small></h3>
                    </div>
                    <div class="panel-body">
                        {{ form_start(form) }}
                        <form role="form">
                            <div class="row">
                                <div class="form-group col-xs-12 col-sm-6 col-md-3">
                                    <label for="nom">Nom</label>
                                    {{ form_widget(form.nom, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-12 col-sm-6 col-md-3">
                                    <label for="prenom">Prenom</label>
                                    {{ form_widget(form.prenom, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-6 col-sm-6 col-md-3">
                                    <label for="genre">Genre</label>
                                    {{ form_widget(form.genre, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-6 col-sm-6 col-md-3">
                                    <label for="refP">Type</label>
                                    {{ form_widget(form.refPersonne, { 'attr': {'class': 'form-control'} }) }}
                                </div>      
                            </div>
                            <div class="row">
                                <div class="form-group col-xs-12 col-sm-6 col-md-6">
                                    <label for="adresse">Adresse</label>
                                    {{ form_widget(form.adresse, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-12 col-sm-6 col-md-6">
                                    <label for="adresseP">Adresse Parents</label>
                                    {{ form_widget(form.adresseParents, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-xs-12 col-sm-6 col-md-4">
                                    <label for="mobile">Mobile</label>
                                    {{ form_widget(form.mobile, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-12 col-sm-6 col-md-4">
                                    <label for="tel">Tel</label>
                                    {{ form_widget(form.tel, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                                <div class="form-group col-xs-12 col-sm-6 col-md-4">
                                    <label for="license">License</label>
                                    {{ form_widget(form.license, { 'attr': {'class': 'form-control'} }) }}
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-xs-12 col-sm-6 col-md-12">
                                    <label for="divers">Divers</label>
                                    {{ form_widget(form.divers, { 'attr': {'class': 'form-control pull-right'} }) }}
                                </div>    
                            </div>
                            <!-- <div class="checkbox">
                              <label>
                                <input type="checkbox"> Check me out
                              </label>
                            </div> -->
                            <div class="row centered-form">
                                <div class="form-group col-xs-12 col-sm-6 col-md-4 col-md-offset-2">
                                    {{ form_widget(form.save, { 'attr': {'class': 'btn btn-success btn-lg btn-block'} }) }}
                                    <!-- Generate new token -->
                                    {{ form_widget(form._token) }}
                                </div>
                                <div class="form-group col-xs-12 col-sm-6 col-md-4">
                                    <INPUT TYPE="reset" class="btn btn-danger btn-lg btn-block" NAME="nom" VALUE="Annuler">
                                </div>
                            </div>
                        </form>
                        {{ form_end(form) }}
                    </div>
                </div>
            </div>

            <hr>
            <footer>
                <p>© ProjectBasket 2014</p>
            </footer>
        </div> <!-- /container -->


        <!-- Bootstrap core JavaScript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="../../dist/js/bootstrap.min.js"></script>
        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
        <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
    {% endblock %}
